var uid, ws, money, platform, spage, pid;
document.addEventListener('plusready', function(){
	uid = plus.storage.getItem('uid');
	ws = plus.webview.currentWebview();
	money = ws.money;
	platform = ws.platform;
	spage = ws.spage;
	pid = ws.pid;
	//点击确认
	$('.res_pasw').on('tap', function(){
		var name = $('.name').val();
		var account = $('.account').val();
		if(!name.trim() || !account.trim()){
			toast('请完善信息');return;
		}
		showWating();
		$.ajax({
			type:"get",
			url:apiRoot+"/home/income/recharge",
			data:{
				deposit :uid,
				money :money,
				platform :platform,
				name :name,
				account :account,
				tid :78
			},
			success :function(data){
				plus.nativeUI.closeWaiting();
				console.log(data);
				if(data > 0){
					toast('提交成功');
					ws.close();
					if(spage)plus.webview.getWebviewById(spage).close();
					if(pid)plus.webview.getWebviewById(pid).close();
					plus.webview.getWebviewById('me-jf-home.html').reload();
				}else{
					toast('提交失败');
				}
			},
			error :function(e){
				errortoast();
				console.log(JSON.stringify(e));
			}
		});
	})
}, false)